﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService
{
    public interface INoticeService
    {
        /// <summary>
        /// 公告列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<notice_dto> GetNotices(NoticeQuery query);

        /// <summary>
        /// 获得公告
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        notice_dto GetNotice(long id);

        /// <summary>
        /// 新增公告
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int AddNotice(notice_dto dto);

        /// <summary>
        /// 更新公告
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int UpdateNotice(notice_dto dto);

        /// <summary>
        /// 删除公告(仅后台调用)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteNotice(long id);

        /// <summary>
        /// 发布公告
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int PublishNotice(long id);

        #region API接口
        /// <summary>
        /// 获得APP首页最新公告
        /// </summary>
        /// <returns></returns>
        notice_dto GetAppIndexNotice(long userId);

        /// <summary>
        /// 获得APP公告列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<notice_dto> GetAppNoticePageList(NoticeApiQuery query,long userId);

        /// <summary>
        /// App获得公告详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        notice_dto AppGetNotice(long id, long userId);
        /// <summary>
        /// 消息通知
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        notice_message_dto GetNoticMessage(long userId);
        /// <summary>
        /// 未读数量
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        int GetUnReads(long userId);
        /// <summary>
        /// 消息列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<message_item_ex> GetNoticMessageEx(long userId);
        /// <summary>
        /// APP逻辑删除公告阅读记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int APPDeleteNotice(long id, long userId);
        #endregion

        #region 合伙人营销系统
        /// <summary>
        /// 获得合伙人系统公告列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<markting_notice_dto> GetMarktingNoticePageList(PageQuery query, long userId);
        /// <summary>
        /// 获得合伙人系统公告详情
        /// </summary>
        /// <returns></returns>
        markting_notice_dto_ex GetMarktingNotice(long id, long userId);
        #endregion

        #region 拓垦商品发布系统
        /// <summary>
        /// 获取合伙人系统消息
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        //PagedResult<message_push_dto> GetNoticePageList(PageQuery query, long userId);
        /// <summary>
        /// 获取合伙人系统消息详情
        /// </summary>
        /// <returns></returns>
        //message_push_dto GetNotice(long id, long userId);
        #endregion
    }
}
